3 import java.io.Serializable;
4 import java.util.Arrays;
8 public class Account implements Serializable {
13 private static final long serialVersionUID = 1L;
16 private byte[] username;
17 private byte[] password;
22 private boolean admin = false;
25 public Account(String usr){
29 public Account(String usr, String pass, boolean isAdmin) {
34 public Account(String usr, String pass, Owner ow) {
39 public byte[] getUsername() {
43 public byte[] getPassword() {
47 public Owner getOwner() {
51 public boolean getAdmin() {
55 public void setAdmin(boolean admin) {
59 public byte[] getSalt() {
63 public void setSalt(byte[] salt) {
69 public boolean equals(Object obj) {
74 if (getClass() != obj.getClass())
76 Account other = (Account) obj;
77 if (!Arrays.equals(password, other.password))
79 if (!Arrays.equals(username, other.username))